package com.lang.generator.service.impl;

import com.lang.generator.domain.entity.TableStructure;
import com.lang.generator.core.helper.SqlParserHelper;
import com.lang.generator.service.SqlParserService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * 生成器服务impl
 *
 * @author Lang
 * @date 2022/11/19
 */
@Service
@Slf4j
public class SqlParserServiceImpl implements SqlParserService {

    @Resource
    private SqlParserHelper sqlParserHelper;

    @Override
    public List<TableStructure> sqlParser(String content) {
        return sqlParserHelper.buildFromSqlList(content);
    }

}
